import pygame
from random import randrange
from itertools import count

pygame.init()
width,height = 480, 480
screen = pygame.display.set_mode((width,height))

snake = [pygame.Rect(10, 10 + value * 10, 10, 10) for value in range(20)]

while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            exit(0)
    screen.fill((0,0,0))
    for rect in snake:
        pygame.draw.rect(screen,(255,255,255),rect)
    
    pygame.display.flip()
